import os
import openai

openai.api_type = "azure"
openai.api_base = "https://romame2023.openai.azure.com/"
openai.api_version = "2023-06-01-preview"
openai.api_key = 'cf99c02ce4b84f49889be058f47d6256'

response = openai.Image.create(
    prompt='生成一辆跑车，飞驰在泥泞的土地里，泥浆飞溅,有个人坐在赛车上',
    size='1024x1024',
    n=1
)

image_url = response["data"][0]["url"]
print(image_url)